@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.permission {
  .mainWrapper {
    padding-right: 24px;
  }

  .toggleSwitchWrapper {
    display: flex;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--lineColor);

    .switchText {
      padding-left: 8px;
    }
  }

  .permissionSelect {
    margin-bottom: 16px;
  }

  .tipContainer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-right: 24px;

    .tip {
      max-width: 400px;
    }

    .viewByPersonBtn {
      display: flex;
      align-items: center;
      cursor: pointer;
    }
  }

  .addBtnWrapper {
    position: relative;
    margin: 16px 0;

    .addBtn {
      display: flex;
      align-items: center;
    }
  }

  .scrollContainer {
    padding-right: 12px;
    overflow-x: hidden;
    overflow-y: scroll;
    min-height: 200px;
    max-height: 400px;
  }

  :global {
    .ant-radio-wrapper-checked {
      & > span:last-child span {
        font-weight: bold;
        color: var(--firstLevelText);
      }
    }
  }
}


@media screen and (max-width: @w-md) {
  .permission {
    height: 100%;
    display: flex;
    flex-direction: column;

    .paddingContainer {
      padding-right: 0;
    }

    .mainWrapper {
      padding-right: 0;
    }

    .tipContainer {
      padding-top: 16px;
    }

    .addBtnWrapper {
      margin-top: 0;
      margin-bottom: 16px;
    }

    .scrollContainer {
      padding-right: 0;
    }

    .memberDetail {
      text-decoration: underline;

      &.appointMemberDetail {
        display: inline-block;
      }
    }

    .inviteBtn {
      width: fit-content;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      color: var(--primaryColor);

      svg {
        width: 16px;
        height: 16px;
        fill: var(--primaryColor);
        margin-right: 4px;
      }
    }
  }

  .item {
    height: 64px;
    display: flex;
    align-items: center;

    &:not(:last-child) {
      position: relative;

      &::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background: var(--lineColor);
        transform: scaleY(0.5);
      }
    }

    .title {
      font-size: 15px;
      color: var(--firstLevelText);
      padding-bottom: 4px;
    }

    .desc {
      font-size: 12px;
      color: var(--thirdLevelText);
    }
  }
}
